#ifndef PATHDIALOG_H
#define PATHDIALOG_H

#include "ui_pathdialog.h"

#include "pathobject.h"
#include "pointdialog.h"

class PathDialog : public QDialog
{
 Q_OBJECT

 public :
  PathDialog(QWidget *parent=NULL);

  ~PathDialog();

  void clear();
  void setPathObject(PathObject);

 signals :
  void showMessage(QString, bool);
  void pathObjectChanged(PathObject);
  void directionChanged(int, Vec);

 private slots :
  void pointChanged(int, Vec);
  void showPoints(bool);
  void pointNumber(int);

  void on_divisions_valueChanged(int);
  void on_sections_valueChanged(int);
  void on_opacity_valueChanged(double);
  void on_closed_clicked(bool);
  void on_spline_clicked(bool);
  void on_tube_clicked(bool);

  void on_color_clicked(bool);

  void on_sameforall_clicked(bool);
  
  void on_captype_currentIndexChanged(int);
  void on_arrowdirection_clicked(bool);
  void on_arrowforall_clicked(bool);

  void on_radx_valueChanged(double);
  void on_rady_valueChanged(double);
  void on_angle_valueChanged(double);

  void on_insertafter_pressed();
  void on_insertbefore_pressed();

  void on_remove_pressed();

  void updatePathObject();

 private :
  Ui::PathDialog ui;

  PointDialog *m_pointDialog;

  bool m_showPoints;
  int m_pointNumber;
  QList<Vec> m_points;
  QList<float> m_radX;
  QList<float> m_radY;
  QList<float> m_angle;  
  Vec m_color;
  float m_opacity;
  int m_sections;
  int m_segments;
  bool m_tube;
  bool m_closed; 
  int m_capType;
  bool m_arrowDirection;
  bool m_arrowForAll;
  bool m_sameForAll;

  void fillInformation();
};

#endif
